home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / os2-emx / diffs.txt next >
Text File  |  1996-10-25  |  25KB  |  778 lines

  1. diff -r -w -c 494p1/compat/lib/setitimer.c os2-494p1/compat/lib/setitimer.c
  2. *** 494p1/compat/lib/setitimer.c    Wed Dec 14 22:23:52 1994
  3. --- os2-494p1/compat/lib/setitimer.c    Tue Sep 03 22:37:20 1996
  4. ***************
  5. *** 2,7 ****
  6. --- 2,20 ----
  7.   static char rcsid[] = "$Id: diffs.txt,v 1.1 1996/10/25 17:13:54 vixie Exp $";
  8.   #endif
  9.   
  10. + #ifdef __EMX__
  11. + #include <sys/time.h>
  12. + int setitimer(int which, const struct itimerval *value,
  13. +             struct itimerval *ovalue)
  14. + {
  15. +         if (alarm(value->it_value.tv_sec) >= 0)
  16. +                 return (0);
  17. +         else
  18. +                 return (-1);
  19. + }
  20. + #endif
  21.   /*
  22.    * Setitimer emulation routine for UNICOS BIND.
  23.    */
  24. diff -r -w -c 494p1/conf/options.h os2-494p1/conf/options.h
  25. *** 494p1/conf/options.h    Fri May 17 02:10:41 1996
  26. --- os2-494p1/conf/options.h    Tue Sep 03 22:24:22 1996
  27. ***************
  28. *** 88,94 ****
  29.   #define QRYLOG      /* enable SIGWINCH for query logging (bb) */
  30.   /*#define YPKLUDGE      /* deal effectively with broken "ypserv -i" (mcsun) */
  31.   #define TRACEROOT      /* trace bogus root servers and ignore them (pma,bb) */
  32. ! /*#define LOCALDOM    /* permit "domain" directive in named.boot (ucb) */
  33.   #define FORCED_RELOAD    /* refresh secondary zones on SIGHUP (pma) */
  34.   #define SLAVE_FORWARD    /* use sensible timeouts on slave forwarders (pma) */
  35.   #define WANT_PIDFILE    /* if you want the named.pid file (ucb/arc) */
  36. --- 88,94 ----
  37.   #define QRYLOG          /* enable SIGWINCH for query logging (bb) */
  38.   /*#define YPKLUDGE      /* deal effectively with broken "ypserv -i" (mcsun) */
  39.   #define TRACEROOT       /* trace bogus root servers and ignore them (pma,bb) */
  40. ! #define LOCALDOM      /* permit "domain" directive in named.boot (ucb)
  41.   #define FORCED_RELOAD   /* refresh secondary zones on SIGHUP (pma) */
  42.   #define SLAVE_FORWARD   /* use sensible timeouts on slave forwarders (pma) */
  43.   #define WANT_PIDFILE    /* if you want the named.pid file (ucb/arc) */
  44. ***************
  45. *** 116,122 ****
  46.   #define PURGE_ZONE    /* remove all traces of a zone when reloading (mpa) */
  47.   #define STATS        /* keep nameserver statistics; uses more memory */
  48.   #define RENICE      /* named-xfer should run at normal priority */
  49. ! /*#define XSTATS    /* extended statistics, syslogged periodically (bg) */
  50.   /*#define BIND_NOTIFY    /* experimental - do not enable in customer products */
  51.   #define LOC_RR        /* support for LOC record parsing (ckd/vix) */
  52.   #define SORT_RESPONSE    /* should we try to sort responses optimally? (vix) */
  53. --- 116,122 ----
  54.   #define PURGE_ZONE      /* remove all traces of a zone when reloading (mpa) */
  55.   #define STATS           /* keep nameserver statistics; uses more memory */
  56.   #define RENICE          /* named-xfer should run at normal priority */
  57. ! #define XSTATS        /* extended statistics, syslogged periodically (bg)
  58.   /*#define BIND_NOTIFY   /* experimental - do not enable in customer products */
  59.   #define LOC_RR          /* support for LOC record parsing (ckd/vix) */
  60.   #define SORT_RESPONSE   /* should we try to sort responses optimally? (vix) */
  61. diff -r -w -c 494p1/conf/portability.h os2-494p1/conf/portability.h
  62. *** 494p1/conf/portability.h    Thu Jun 06 13:19:09 1996
  63. --- os2-494p1/conf/portability.h    Tue Sep 03 22:31:14 1996
  64. ***************
  65. *** 153,158 ****
  66. --- 153,166 ----
  67.   # define SYSV
  68.   #endif
  69.   
  70. + #ifdef __EMX__
  71. + # define vfork fork
  72. + # define USE_POSIX
  73. + # define USE_UTIME
  74. + # define HAVE_SETVBUF
  75. + # define NEED_STRCASECMP
  76. + #endif
  77.   #if defined(_POSIX_SOURCE) || defined(__sgi) || defined(__ultrix) || \
  78.           defined(__hpux) || (defined(BSD) && (BSD >= 199103)) || \
  79.           (defined(sun) && defined(SYSV))
  80. ***************
  81. *** 424,430 ****
  82.   # define PORT_WOULDBLK    EWOULDBLOCK
  83.   #endif
  84.   
  85. ! #if defined(USE_POSIX)
  86.   # define USE_SETSID
  87.   #endif
  88.   
  89. --- 432,438 ----
  90.   # define PORT_WOULDBLK  EWOULDBLOCK
  91.   #endif
  92.   
  93. ! #if defined(USE_POSIX) && !defined(__EMX__)
  94.   # define USE_SETSID
  95.   #endif
  96.   
  97. diff -r -w -c 494p1/include/netdb.h os2-494p1/include/netdb.h
  98. *** 494p1/include/netdb.h    Wed May 08 22:59:10 1996
  99. --- os2-494p1/include/netdb.h    Tue Sep 03 22:15:52 1996
  100. ***************
  101. *** 67,77 ****
  102. --- 67,85 ----
  103.   #endif
  104.   #include <sys/cdefs.h>
  105.   
  106. + #ifdef __EMX__
  107. + #define _PATH_HEQUIV    "/tcpip/etc/hosts.equ"
  108. + #define _PATH_HOSTS     "/tcpip/etc/hosts"
  109. + #define _PATH_NETWORKS  "/tcpip/etc/networks"
  110. + #define _PATH_PROTOCOLS "/tcpip/etc/protocol"
  111. + #define _PATH_SERVICES  "/tcpip/etc/services"
  112. + #else
  113.   #define _PATH_HEQUIV    "/etc/hosts.equiv"
  114.   #define _PATH_HOSTS     "/etc/hosts"
  115.   #define _PATH_NETWORKS  "/etc/networks"
  116.   #define _PATH_PROTOCOLS "/etc/protocols"
  117.   #define _PATH_SERVICES  "/etc/services"
  118. + #endif
  119.   
  120.   extern int h_errno;
  121.   
  122. diff -r -w -c 494p1/include/resolv.h os2-494p1/include/resolv.h
  123. *** 494p1/include/resolv.h    Sun Jun 02 01:20:38 1996
  124. --- os2-494p1/include/resolv.h    Tue Sep 03 22:16:26 1996
  125. ***************
  126. *** 87,93 ****
  127. --- 87,97 ----
  128.    */
  129.   
  130.   #ifndef _PATH_RESCONF
  131. + #ifdef __EMX__
  132. + #define _PATH_RESCONF        "/tcpip/etc/resolv"
  133. + #else
  134.   #define _PATH_RESCONF        "/etc/resolv.conf"
  135. + #endif
  136.   #endif
  137.   
  138.   /*
  139. diff -r -w -c 494p1/named/db_dump.c os2-494p1/named/db_dump.c
  140. *** 494p1/named/db_dump.c    Mon Aug 05 01:31:30 1996
  141. --- os2-494p1/named/db_dump.c    Tue Sep 03 21:42:00 1996
  142. ***************
  143. *** 139,145 ****
  144. --- 139,150 ----
  145.           return;
  146.       }
  147.   
  148. + #ifdef __EMX__
  149. +     if (rename_unixstyle(tmpcheckfile, cache_file)) {
  150. + #else
  151.       if (rename(tmpcheckfile, cache_file)) {
  152. + #endif
  153.           dprintf(3, (ddt, "doachkpt(install %s to %s failed, %d)\n",
  154.                       tmpcheckfile, cache_file, errno));
  155.       }
  156. ***************
  157. *** 235,242 ****
  158. --- 240,259 ----
  159.   {
  160.           FILE    *fp;
  161.   
  162. + #ifdef __EMX__
  163. +         char *cp;
  164. + #endif
  165.           dprintf(3, (ddt, "doadump()\n"));
  166.           syslog(LOG_NOTICE, "dumping nameserver data\n");
  167. + #ifdef __EMX__
  168. +         if (((cp = getenv("TMP")) != NULL) || ((cp = getenv("TEMP")) != NULL)) {
  169. +         /* TMP or TEMP points to the OS/2 temporaries directory */
  170. +           strcpy(dumpfile, cp);
  171. +           strcat(dumpfile, _PATH_DUMPFILEF);
  172. +         }
  173. + #endif
  174.   
  175.           if ((fp = fopen(dumpfile, "w")) == NULL)
  176.                   return;
  177. diff -r -w -c 494p1/named/db_glob.h os2-494p1/named/db_glob.h
  178. *** 494p1/named/db_glob.h    Wed Dec 06 12:34:39 1995
  179. --- os2-494p1/named/db_glob.h    Thu Aug 08 11:12:16 1996
  180. ***************
  181. *** 71,80 ****
  182. --- 71,92 ----
  183.           /* current line number */
  184.   DECL    int             lineno;
  185.   
  186. + #ifdef __EMX__
  187.   #ifdef DUMPFILE
  188. + DECL    char            path_dumpfile[_MAX_PATH] INIT(DUMPFILE);
  189. + #else
  190. + DECL    char            path_dumpfile[_MAX_PATH] INIT(_PATH_DUMPFILE);
  191. + #endif
  192. + DECL    char            *dumpfile INIT(path_dumpfile);
  193. + #else
  194. + #ifdef DUMPFILE
  195.   DECL    char            *dumpfile INIT(DUMPFILE);
  196.   #else
  197.   DECL    char            *dumpfile INIT(_PATH_DUMPFILE);
  198. + #endif
  199.   #endif
  200.   
  201.           /* root hash table */
  202. diff -r -w -c 494p1/named/named-xfer.c os2-494p1/named/named-xfer.c
  203. *** 494p1/named/named-xfer.c    Mon Aug 05 01:31:31 1996
  204. --- os2-494p1/named/named-xfer.c    Tue Sep 03 22:01:56 1996
  205. ***************
  206. *** 113,119 ****
  207. --- 113,123 ----
  208.   
  209.   static  struct zoneinfo zone;           /* zone information */
  210.   
  211. + #ifdef __EMX__
  212. + static  char            ddtfilename[_MAX_PATH] = _PATH_TMPXFER,
  213. + #else
  214.   static  char            ddtfilename[] = _PATH_TMPXFER,
  215. + #endif
  216.                           *ddtfile = ddtfilename,
  217.                           *tmpname,
  218.                           *domain;                /* domain being xfered */
  219. ***************
  220. *** 276,281 ****
  221. --- 280,286 ----
  222.                                  tmpname);
  223.                   exit(XFER_FAIL);
  224.           }
  225. + #ifndef __EMX__
  226.   #if HAVE_FCHMOD
  227.           if (fchmod(dbfd, 0644) == -1)
  228.   #else
  229. ***************
  230. *** 288,293 ****
  231. --- 293,299 ----
  232.                                  tmpname);
  233.                   exit(XFER_FAIL);
  234.           }
  235. + #endif
  236.           if ((dbfp = fdopen(dbfd, "r+")) == NULL) {
  237.                   perror(tmpname);
  238.                   if (!quiet)
  239. ***************
  240. *** 296,306 ****
  241. --- 302,322 ----
  242.           }
  243.   #ifdef DEBUG
  244.           if (debug) {
  245. + #ifdef __EMX__
  246. +                 /* for OS/2 we check the TMP environment-variable first */
  247. +                 char *cp;
  248. +                 if (((cp = getenv("TMP")) != NULL) || ((cp = getenv("TEMP")) != NULL)) {
  249. +                   strcpy(ddtfilename, cp);
  250. +                   strcat(ddtfilename, _PATH_TMPXFERF);
  251. +                 }
  252. + #endif
  253.                   /* ddtfile is now something like "/usr/tmp/xfer.ddt.XXXXXX" */
  254.                   if ((ddtd = mkstemp(ddtfile)) == -1) {
  255.                           perror(ddtfile);
  256.                           debug = 0;
  257.                   }
  258. + #ifndef __EMX__
  259.   #if HAVE_FCHMOD
  260.                   else if (fchmod(ddtd, 0644) == -1)
  261.   #else
  262. ***************
  263. *** 309,315 ****
  264.           {
  265.               perror(ddtfile);
  266.               debug = 0;
  267. !         } else if ((ddt = fdopen(ddtd, "w")) == NULL) {
  268.               perror(ddtfile);
  269.               debug = 0;
  270.           } else {
  271. --- 325,333 ----
  272.                   {
  273.                           perror(ddtfile);
  274.                           debug = 0;
  275. !                 }
  276. ! #endif
  277. !                 else if ((ddt = fdopen(ddtd, "w")) == NULL) {
  278.                           perror(ddtfile);
  279.                           debug = 0;
  280.                   } else {
  281. ***************
  282. *** 412,418 ****
  283. --- 430,440 ----
  284.           switch (result) {
  285.   
  286.           case XFER_SUCCESS:                      /* ok exit */
  287. + #ifdef __EMX__
  288. +                 if (rename_unixstyle(tmpname, dbfile) == -1) {
  289. + #else
  290.                   if (rename(tmpname, dbfile) == -1) {
  291. + #endif
  292.                           perror("rename");
  293.                           if (!quiet)
  294.                               syslog(LOG_ERR, "rename %s to %s: %m",
  295. diff -r -w -c 494p1/named/ns_glob.h os2-494p1/named/ns_glob.h
  296. *** 494p1/named/ns_glob.h    Mon May 20 08:10:02 1996
  297. --- os2-494p1/named/ns_glob.h    Tue Sep 03 23:27:00 1996
  298. ***************
  299. *** 190,197 ****
  300. --- 190,252 ----
  301.           /* next query to retry */
  302.   DECL    struct qinfo            *retryqp        INIT(NULL);
  303.   
  304. + #ifdef __EMX__
  305. + /* initialization of some files differs due to the possibility of environment
  306. +  * variable overrides; these get fixed in ns_main.c somewhere in main() */
  307.           /* default boot file */
  308.   #ifdef BOOTFILE
  309. + DECL    char                    path_boot[_MAX_PATH]       INIT(BOOTFILE);
  310. + #else
  311. + DECL    char                    path_boot[_MAX_PATH]       INIT(_PATH_BOOT);
  312. + #endif
  313. + DECL    char                    *bootfile                  INIT(path_boot);
  314. +         /* default debug output file */
  315. + #ifdef DEBUGFILE
  316. + DECL    char                    path_debug[_MAX_PATH]      INIT(DEBUGFILE);
  317. + #else
  318. + DECL    char                    path_debug[_MAX_PATH]      INIT(_PATH_DEBUG);
  319. + #endif
  320. + DECL    char                    *debugfile                 INIT(path_debug);
  321. + #ifdef WANT_PIDFILE
  322. +         /* file to store current named PID */
  323. + #ifdef PIDFILE
  324. + DECL    char                    path_pidfile[_MAX_PATH]    INIT(PIDFILE);
  325. + #else
  326. + DECL    char                    path_pidfile[_MAX_PATH]    INIT(_PATH_PIDFILE);
  327. + #endif
  328. + DECL    char                    *PidFile                   INIT(path_pidfile);
  329. + #endif /* WANT_PIDFILE */
  330. + #ifdef STATSFILE
  331. + DECL    char                    path_stats[_MAX_PATH]      INIT(STATSFILE);
  332. + #else
  333. + DECL    char                    path_stats[_MAX_PATH]      INIT(_PATH_STATS);
  334. + #endif
  335. + DECL    char                    *statsfile                 INIT(path_stats);
  336. + #ifdef TMPDIR
  337. + DECL    char                    path_tempdir[_MAX_PATH]    INIT(TMPDIR);
  338. + #else
  339. + DECL    char                    path_tempdir[_MAX_PATH]    INIT(_PATH_TMPDIR);
  340. + #endif
  341. + DECL    char                    *path_tmpdir               INIT(path_tempdir);
  342. + #ifdef PATH_XFER
  343. + DECL    char                    path_named_xfer[_MAX_PATH] INIT(PATH_XFER);
  344. + #else
  345. + DECL    char                    path_named_xfer[_MAX_PATH] INIT(_PATH_XFER);
  346. + #endif
  347. + DECL    char                    *path_xfer                 INIT(path_named_xfer);
  348. + DECL    char                    path_xferddt[_MAX_PATH]    INIT(_PATH_XFERDDT);
  349. + DECL    char                    path_xfertrace[_MAX_PATH]  INIT(_PATH_XFERTRACE);
  350. + #else
  351. +         /* default boot file */
  352. + #ifdef BOOTFILE
  353.   DECL    char                    *bootfile       INIT(BOOTFILE);
  354.   #else
  355.   DECL    char                    *bootfile       INIT(_PATH_BOOT);
  356. ***************
  357. *** 213,218 ****
  358. --- 268,281 ----
  359.   #endif
  360.   #endif /*WANT_PIDFILE*/
  361.   
  362. + #ifdef STATSFILE
  363. + DECL    const char              *statsfile      INIT(STATSFILE);
  364. + #else
  365. + DECL    const char              *statsfile      INIT(_PATH_STATS);
  366. + #endif
  367. + #endif
  368.           /* zone information */
  369.   DECL    struct zoneinfo         *zones          INIT(NULL);
  370.   
  371. ***************
  372. *** 245,256 ****
  373.   #ifdef SLAVE_FORWARD
  374.       /* retry time when a slave */
  375.   DECL    int            slave_retry    INIT(4);
  376. - #endif
  377. - #ifdef STATSFILE
  378. - DECL    const char        *statsfile    INIT(STATSFILE);
  379. - #else
  380. - DECL    const char        *statsfile    INIT(_PATH_STATS);
  381.   #endif
  382.   
  383.   DECL    const char        sendtoStr[]    INIT("sendto");
  384. --- 308,313 ----
  385. diff -r -w -c 494p1/named/ns_init.c os2-494p1/named/ns_init.c
  386. *** 494p1/named/ns_init.c    Mon Aug 05 01:31:32 1996
  387. --- os2-494p1/named/ns_init.c    Tue Sep 03 21:48:56 1996
  388. ***************
  389. *** 267,273 ****
  390. --- 267,277 ----
  391.                   }
  392.                   if (strcasecmp(buf, "directory") == 0) {
  393.                           (void) getword(buf, sizeof(buf), fp, 0);
  394. + #ifdef __EMX__
  395. +                         if (_chdir2(buf) < 0) {
  396. + #else
  397.                           if (chdir(buf) < 0) {
  398. + #endif
  399.                                   syslog(LOG_CRIT, "directory %s: %m\n",
  400.                                           buf);
  401.                                   exit(1);
  402. ***************
  403. *** 588,595 ****
  404. --- 592,604 ----
  405.                                    * We will always transfer this zone again
  406.                                    * after a reload.
  407.                                    */
  408. + #ifdef __EMX__
  409. +                                  sprintf(buf, "%s/NsTmp%ld.%d", path_tmpdir,
  410. +                                         (long)getpid(), tmpnum++);
  411. + #else
  412.                                    sprintf(buf, "%s/NsTmp%ld.%d", _PATH_TMPDIR,
  413.                                           (long)getpid(), tmpnum++);
  414. + #endif
  415.                                   source = savestr(buf);
  416.                                   zp->z_flags |= Z_TMP_FILE;
  417.                           } else
  418. diff -r -w -c 494p1/named/ns_main.c os2-494p1/named/ns_main.c
  419. *** 494p1/named/ns_main.c    Mon Aug 05 01:31:32 1996
  420. --- os2-494p1/named/ns_main.c    Tue Sep 03 23:37:40 1996
  421. ***************
  422. *** 197,202 ****
  423. --- 197,236 ----
  424.           u_char ip_opts[50];             /* arbitrary size */
  425.   #endif
  426.   
  427. + #ifdef __EMX__
  428. +         char *cp;
  429. +         if ((cp = getenv("ETC")) != NULL) {
  430. +           /* ETC points to the OS/2 version of the /etc directory */
  431. +           strcpy(bootfile, cp);
  432. +           strcat(bootfile, _PATH_BOOTF);
  433. +           strcpy(PidFile, cp);
  434. +           strcat(PidFile, _PATH_PIDFILEF);
  435. +         }
  436. +         if (((cp = getenv("TMP")) != NULL) || ((cp = getenv("TEMP")) != NULL)) {
  437. +           /* TMP or TEMP points to the OS/2 temporaries directory */
  438. +           strcpy(debugfile, cp);
  439. +           strcat(debugfile, _PATH_DEBUGF);
  440. +           strcpy(statsfile, cp);
  441. +           strcat(statsfile, _PATH_STATSF);
  442. +           strcpy(path_xfertrace, cp);
  443. +           strcat(path_xfertrace, _PATH_XFERTRACEF);
  444. +           strcpy(path_xferddt, cp);
  445. +           strcat(path_xferddt, _PATH_XFERDDTF);
  446. +           strcpy(path_tmpdir, cp);
  447. +         }
  448. +         if ((cp = getenv("NAMED_XFER")) != NULL) {
  449. +           /* NAMED_XFER points to the named-xfer program */
  450. +           strcpy(path_xfer, cp);
  451. +         }
  452. +         if ((cp = getenv("NAMED_BOOT")) != NULL) {
  453. +           /* NAMED_BOOT points to the named.boot file */
  454. +           strcpy(bootfile, cp);
  455. +         }
  456. + #endif
  457.           local_ns_port = ns_port = htons(NAMESERVER_PORT);
  458.   
  459.           /* BSD has a better random number generator but it's not clear
  460. ***************
  461. *** 507,512 ****
  462. --- 541,547 ----
  463.   #if defined(SYSV) || defined(hpux)
  464.                   setpgrp();
  465.   #else
  466. + #ifndef __EMX__
  467.                   {
  468.                           struct itimerval ival;
  469.   
  470. ***************
  471. *** 531,536 ****
  472. --- 566,572 ----
  473.                                   (void) my_close(n);
  474.                           }
  475.                   }
  476. + #endif
  477.   #endif /* SYSV */
  478.   #endif /* HAVE_DAEMON */
  479.           }
  480. diff -r -w -c 494p1/named/ns_maint.c os2-494p1/named/ns_maint.c
  481. *** 494p1/named/ns_maint.c    Mon Aug 05 01:31:32 1996
  482. --- os2-494p1/named/ns_maint.c    Tue Sep 03 21:54:20 1996
  483. ***************
  484. *** 414,421 ****
  485.   #endif
  486.   
  487.       dprintf(1, (ddt, "startxfer() %s\n", zp->z_origin));
  488.       argv[argc++] = _PATH_XFER;
  489.       argv[argc++] = "-z";
  490.       argv[argc++] = zp->z_origin;
  491.       argv[argc++] = "-f";
  492. --- 414,424 ----
  493.   #endif
  494.   
  495.           dprintf(1, (ddt, "startxfer() %s\n", zp->z_origin));
  496. ! #ifdef __EMX__
  497. !         argv[argc++] = path_xfer;
  498. ! #else
  499.           argv[argc++] = _PATH_XFER;
  500. + #endif
  501.           argv[argc++] = "-z";
  502.           argv[argc++] = zp->z_origin;
  503.           argv[argc++] = "-f";
  504. ***************
  505. *** 443,452 ****
  506. --- 446,463 ----
  507.                   sprintf(debug_str, "%d", debug);
  508.                   argv[argc++] = debug_str;
  509.                   argv[argc++] = "-l";
  510. + #ifdef __EMX__
  511. +                 argv[argc++] = path_xferddt;
  512. + #else
  513.                   argv[argc++] = _PATH_XFERDDT;
  514. + #endif
  515.                   if (debug > 5) {
  516.                           argv[argc++] = "-t";
  517. + #ifdef __EMX__
  518. +                         argv[argc++] = path_xfertrace;
  519. + #else
  520.                           argv[argc++] = _PATH_XFERTRACE;
  521. + #endif
  522.                   }
  523.           }
  524.   #endif
  525. ***************
  526. *** 503,510 ****
  527. --- 514,526 ----
  528.   
  529.           if (pid == 0) {
  530.                   /* Child. */
  531. + #ifdef __EMX__
  532. +                 execv(path_xfer, argv);
  533. +                 syslog(LOG_ERR, "can't exec %s: %m", path_xfer);
  534. + #else
  535.                   execv(_PATH_XFER, argv);
  536.                   syslog(LOG_ERR, "can't exec %s: %m", _PATH_XFER);
  537. + #endif
  538.                   _exit(XFER_FAIL);       /* Avoid duplicate buffer flushes. */
  539.           }
  540.           /* Parent. */
  541. diff -r -w -c 494p1/named/ns_req.c os2-494p1/named/ns_req.c
  542. *** 494p1/named/ns_req.c    Mon Aug 05 01:31:33 1996
  543. --- os2-494p1/named/ns_req.c    Tue Sep 03 23:41:44 1996
  544. ***************
  545. *** 2034,2041 ****
  546. --- 2034,2043 ----
  547.           static const int sndbuf = XFER_BUFSIZE * 2;
  548.   #endif
  549.   #ifdef SO_LINGER
  550. + #ifndef __EMX__
  551.           static const struct linger ll = { 1, 120 };
  552.   #endif
  553. + #endif
  554.   
  555.           dprintf(5, (ddt, "startxfr()\n"));
  556.   
  557. ***************
  558. *** 2136,2141 ****
  559. --- 2138,2144 ----
  560.           fwritemsg(rfp, soa, soalen);
  561.           (void) fflush(rfp);
  562.   #ifdef SO_LINGER
  563. + #ifndef __EMX__
  564.           /* kernels that map pages for IO end up failing if the pipe is full
  565.            * at exit and we take away the final buffer.  this is really a kernel
  566.            * bug but it's harmless on systems that are not broken, so...
  567. ***************
  568. *** 2143,2148 ****
  569. --- 2146,2152 ----
  570.           setsockopt(qsp->s_rfd, SOL_SOCKET, SO_LINGER,
  571.                      (char *)&ll, sizeof ll);
  572.           close(qsp->s_rfd);
  573. + #endif
  574.   #endif
  575.           _exit(0);
  576.           /* NOTREACHED */
  577. diff -r -w -c 494p1/named/pathnames.h os2-494p1/named/pathnames.h
  578. *** 494p1/named/pathnames.h    Wed Dec 14 22:24:22 1994
  579. --- os2-494p1/named/pathnames.h    Thu Aug 08 12:51:50 1996
  580. ***************
  581. *** 62,67 ****
  582. --- 62,92 ----
  583.   # define _PATH_XFER_PREDEFINED  /* probably from Makefile */
  584.   #endif
  585.   
  586. + #ifdef __EMX__
  587. + #define _PATH_BOOT      "/tcpip/etc/namedb/named.boot"
  588. + #define _PATH_BOOTF     "/namedb/named.boot"
  589. + #define _PATH_DEVNULL   "nul"
  590. + #define _PATH_TTY       "con"
  591. + #ifndef _PATH_XFER
  592. + # define _PATH_XFER     "/tcpip/bin/named-xfer"
  593. + #endif
  594. + #define _PATH_DEBUG     "/tmp/named.run"
  595. + #define _PATH_DEBUGF    "/named.run"
  596. + #define _PATH_DUMPFILE  "/tmp/named_dump.db"
  597. + #define _PATH_DUMPFILEF  "/named_dump.db"
  598. + #define _PATH_PIDFILE  "/tcpip/etc/named.pid"
  599. + #define _PATH_PIDFILEF "/named.pid"
  600. + #define _PATH_STATS     "/tmp/named.stats"
  601. + #define _PATH_STATSF    "/named.stats"
  602. + #define _PATH_XFERTRACE "/tmp/xfer.trace"
  603. + #define _PATH_XFERTRACEF "/xfer.trace"
  604. + #define _PATH_XFERDDT   "/tmp/xfer.ddt"
  605. + #define _PATH_XFERDDTF  "/xfer.ddt"
  606. + #define _PATH_TMPXFER   "/tmp/xfer.ddt.XXXXXX"
  607. + #define _PATH_TMPXFERF  "/xfer.ddt.XXXXXX"
  608. + #define _PATH_TMPDIR    "/tmp"
  609. + #else
  610.   #if defined (__sgi) && !defined(_SYSTYPE_SVR4) && !defined(__SYSTYPE_SVR4)
  611.   #define _PATH_BOOT      "/usr/etc/named.d/named.boot"
  612.   #else
  613. ***************
  614. *** 120,122 ****
  615. --- 145,149 ----
  616.   #else
  617.   # undef _PATH_XFER_PREDEFINED
  618.   #endif /*_PATH_XFER_PREDEFINED*/
  619. + #endif /* __EMX__ */
  620. diff -r -w -c 494p1/res/getnetent.c os2-494p1/res/getnetent.c
  621. *** 494p1/res/getnetent.c    Mon Aug 05 01:31:35 1996
  622. --- os2-494p1/res/getnetent.c    Tue Sep 03 22:06:38 1996
  623. ***************
  624. *** 59,65 ****
  625. --- 59,69 ----
  626.   #include <string.h>
  627.   
  628.   #ifndef _PATH_NETWORKS
  629. + #ifdef __EMX__
  630. + #define _PATH_NETWORKS  "/tcpip/etc/networks"
  631. + #else
  632.   #define _PATH_NETWORKS  "/etc/networks"
  633. + #endif
  634.   #endif
  635.   
  636.   #define MAXALIASES      35
  637. diff -r -w -c 494p1/res/res_init.c os2-494p1/res/res_init.c
  638. *** 494p1/res/res_init.c    Mon Aug 05 01:31:37 1996
  639. --- os2-494p1/res/res_init.c    Tue Sep 03 22:08:38 1996
  640. ***************
  641. *** 156,161 ****
  642. --- 156,164 ----
  643.           register char *cp, **pp;
  644.           register int n;
  645.           char buf[BUFSIZ];
  646. + #ifdef __EMX__
  647. +         char path_resconf[_MAX_PATH];
  648. + #endif
  649.           int nserv = 0;    /* number of nameserver records read from file */
  650.           int haveenv = 0;
  651.           int havesearch = 0;
  652. ***************
  653. *** 253,259 ****
  654. --- 256,273 ----
  655.   #ifdef  NeXT
  656.           if (netinfo_res_init(&haveenv, &havesearch) == 0)
  657.   #endif
  658. + #ifdef __EMX__
  659. +         if ((cp = getenv("ETC")) != NULL) {
  660. +             /* ETC points to the OS/2 version of the /etc directory */
  661. +             strcpy(path_resconf, cp);
  662. +             strcat(path_resconf, "\\resolv");
  663. +         }
  664. +         else
  665. +             strcpy(path_resconf, _PATH_RESCONF);
  666. +         if ((fp = fopen(path_resconf, "r")) != NULL) {
  667. + #else
  668.           if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
  669. + #endif
  670.               /* read the config file */
  671.               while (fgets(buf, sizeof(buf), fp) != NULL) {
  672.                   /* skip comments */
  673. diff -r -w -c 494p1/tools/nslookup/main.c os2-494p1/tools/nslookup/main.c
  674. *** 494p1/tools/nslookup/main.c    Sun Jun 02 01:20:41 1996
  675. --- os2-494p1/tools/nslookup/main.c    Wed Sep 04 00:47:16 1996
  676. ***************
  677. *** 153,158 ****
  678. --- 153,163 ----
  679.    */
  680.   char            *pager;
  681.   
  682. + #ifdef __EMX__
  683. +     char        *helpfile;
  684. +     char        helpfilepath[_MAX_PATH];
  685. + #endif
  686.   static void CvtAddrToPtr();
  687.   static void ReadRC();
  688.   
  689. ***************
  690. *** 323,328 ****
  691. --- 328,344 ----
  692.               pager = _PATH_PAGERCMD;
  693.           }
  694.   
  695. + #ifdef __EMX__
  696. +         helpfile = getenv("NSLOOKUP_HELP");
  697. +         if (helpfile == NULL) {
  698. +             _searchenv(_PATH_HELPFILEF, "HELP", helpfilepath);
  699. +             if (helpfilepath == "") {
  700. +               helpfile = helpfilepath;
  701. +             } else
  702. +               helpfile = _PATH_HELPFILE;
  703. +         }
  704. + #endif
  705.           /*
  706.            * Setup the environment to allow the interrupt handler to return here.
  707.            */
  708. ***************
  709. *** 1051,1057 ****
  710. --- 1067,1077 ----
  711.   {
  712.           char cmd[PATH_MAX];
  713.   
  714. + #ifdef __EMX__
  715. +         sprintf(cmd, "%s %s", pager, helpfile);
  716. + #else
  717.           sprintf(cmd, "%s %s", pager, _PATH_HELPFILE);
  718. + #endif
  719.           system(cmd);
  720.   }
  721.   
  722. diff -r -w -c 494p1/tools/nslookup/pathnames.h os2-494p1/tools/nslookup/pathnames.h
  723. *** 494p1/tools/nslookup/pathnames.h    Wed Dec 14 22:24:32 1994
  724. --- os2-494p1/tools/nslookup/pathnames.h    Tue Sep 03 23:41:48 1996
  725. ***************
  726. *** 62,71 ****
  727. --- 62,81 ----
  728.   #define _PATH_PAGERCMD          "more"
  729.   
  730.   #ifndef _PATH_HELPFILE
  731. + #ifdef __EMX__
  732. + #define _PATH_HELPFILE          "/tcpip/help/nslookup.help"
  733. + #else
  734.   #if defined(BSD) && BSD >= 198810
  735.   #define _PATH_HELPFILE          "/usr/share/misc/nslookup.help"
  736.   #else
  737.   #define _PATH_HELPFILE          "/usr/lib/nslookup.help"
  738. + #endif
  739. + #endif
  740. + #endif
  741. + #ifndef _PATH_HELPFILEF
  742. + #ifdef __EMX__
  743. + #define _PATH_HELPFILEF         "nslookup.help"
  744.   #endif
  745.   #endif
  746.   
  747.